<?php
	include("ytclass.php");
		$ytclass = new YTDownloader();
		$video = mysqli_fetch_assoc(mysqli_query($db,"SELECT * FROM youplay WHERE id='".mysqli_real_escape_string($db,$_GET["id"])."'"));
		$vdata = $ytclass->getDownloadLinks($video["watchid"]);
		$vlink = $vdata["dl"];
?>

<br>

<table width=95% align=center>
	<tbody>
		<tr>
			<td align=center>
				<video class="video-js vjs-default-skin" controls id="player" cover="<?=$vdata["info"]["Thumbnail"]?>" title="<?=$vdata["info"]["Title"]?>" style="width:90%;margin-left:5%">
					Your browser does not support the video tag.
				</video>
				<script>
					hola_player({share:false,sources:[
		<?php
			for($i=0;$i<count($vlink);$i++) {
				if(!strstr($vlink[$i]["type"],"(Audio Only)"))
				echo "{src:'".$vlink[$i]["url"]."',label:'".$vlink[$i]["type"]."'},";
											}
		?>
													]});
				</script>
			</td>
		</tr>
		<tr>
			<td align=center>	<a href="index.php">Back to your videolist</a>	</td>
		</tr>
	</tbody>
</table> 